package com.smh.aiagent.model.pojo;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author shiminghui
 * @date 2025/5/31 17:11
 * @description: TODO
 */
@Data
public class UserMessage {
    @TableId(type = IdType.AUTO)
    private Long id;
    private String conversationId;
    @EnumValue
    private UserMessageType messageType;
    private String content;
    private LocalDateTime createTime;

    public enum UserMessageType {
        USER((short) 0),
        ASSISTANT((short) 1),
        SYSTEM((short) 2),
        TOOL((short) 3);

        @EnumValue
        private final Short value;

        UserMessageType(Short value) {
            this.value = value;
        }

        public Short getValue() {
            return value;
        }
    }
}
